//
//  DetailStyVC.m
//  HomeFurnishing
//
//  Created by dllo on 16/3/29.
//  Copyright © 2016年 YMing. All rights reserved.
//

#import "DetailStyVC.h"
#import "StyBaseModel.h"
@interface DetailStyVC ()
@property(nonatomic, retain)UIWebView *webView;
@end

@implementation DetailStyVC

-(void)dealloc
{
    [_webView release];
    [_mId release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.hidesBackButton = NO;
    self.navigationController.navigationBar.translucent = NO;
    self.navigationController.navigationBarHidden = NO;
    UIButton *leftBtn = [UIButton buttonWithType:(UIButtonTypeSystem)];
    leftBtn.frame = CGRectMake(20, 20, 30, 30);
    [leftBtn setTintColor:[UIColor blackColor]];
    [leftBtn setImage:[UIImage imageNamed:@"iconfont-fanhui@2x"] forState:(UIControlStateNormal)];
    [leftBtn addTarget:self action:@selector(back) forControlEvents:(UIControlEventTouchUpInside)];
    //[self.navigationController.view addSubview:leftBtn];
    
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT -49)];
        NSString *s = [NSString stringWithFormat:@"http://m.guju.com.cn/release/views/gonglue/?id=%@",self.mId];
        NSURL *url = [NSURL URLWithString:s];
        [_webView loadRequest:[NSURLRequest requestWithURL:url]];
        _webView.scalesPageToFit = YES;
        [self.view addSubview:_webView];
        //[self.navigationController.view bringSubviewToFront:leftBtn];
        [_webView release];
}
-(void)back
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    self.navigationController.navigationBarHidden = NO;
    self.navigationController.navigationBar.translucent = YES;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - 滚动方法
/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
